package com.msh.automatic.android.control.script.task

import android.content.Context
import com.alibaba.fastjson2.JSON
import com.alibaba.fastjson2.JSONObject
import com.msh.automatic.android.control.script.service.ScriptAccessibilityService

abstract class Task (
    val task: JSONObject,val taskLog: JSONObject,val token:String
){
    var taskParams: JSONObject = JSON.parseObject(task.getString("params"))
//    lateinit var taskLogParams: JSONObject
//    lateinit var currentBaseTask:Task
    fun getTaskLogId():String{
        return taskLog.getString("id")!!
    }

    abstract suspend fun run(service: ScriptAccessibilityService):Boolean

}